home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / examples / example05.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  382b  |  22 lines

  1. /* Test of drawing a histogram */
  2.  
  3. #include <math.h>
  4.  
  5. main()
  6. {
  7.       int i;
  8.       float data[2048];
  9.  
  10. /* Fill up data points */
  11.  
  12.       for (i=0; i<2048; i++)
  13.         data[i]=sin(0.01*(i+1));
  14.  
  15.       plstar(1,1);
  16.       plhist(2048,data,-1.1,1.1,44,0);
  17.       pllab("\\frValue","\\frFrequency",
  18.             "\\frPLPLOT Example 5 - Probability function of Oscillator");
  19.  
  20.       plend();
  21. }
  22.